﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class MaxminFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As MaxminBE
        Dim tmpMaxmin As MaxminBE = New MaxminBE()
        Try
            With tmpMaxmin
                .Anio = convertDTFromDb.convertInt32(dr.Item("Anio"))
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Maximos = convertDTFromDb.ConvertDecimal(dr.Item("Maximos"))
                .Mes = convertDTFromDb.convertInt32(dr.Item("Mes"))
                .Minimos = convertDTFromDb.ConvertDecimal(dr.Item("Minimos"))
                .Salidas = convertDTFromDb.ConvertDecimal(dr.Item("Salidas"))
            End With
            Return tmpMaxmin
        Catch ex As Exception
            Throw
        Finally
            tmpMaxmin = Nothing
        End Try
    End Function
End Class
